<% @title = "Getting started" %>


<h3 id="installation">Installation</h3>

<p>Getting started with Serve is easy. Because Serve is built with Ruby, you
will need to have Ruby installed on your system. Mac OSX ships with Ruby. If
you are on Windows you can install Ruby with
<a href="http://rubyinstaller.org/">this easy installation package</a>.</p>

<p>Once Ruby is installed, open up the <a href="http://wiseheartdesign.com/articles/2010/11/12/the-designers-guide-to-the-osx-command-prompt/">command prompt</a>, and type:</p>

<pre>gem install serve</pre>


<h3 id="command">Using the serve command</h3>

<p>Serve ships with an easy to use command that makes it easy to turn any
directory into into a browseable set of web pages. To use it, simply change to
the project directory, and type <kbd>serve</kbd>:</p>

<pre>~$ cd my-project
~/my-project$ serve</pre>

<p>This will start Serve up on your local box on port 4000. To view files with
Serve, navigate to <a href="http://localhost:4000">http://localhost:4000</a>
in your web browser.</p>

<p>As you navigate around in your browser, Serve will print out a log of
it&#8217;s activity on the command prompt. When you are ready to stop Serve
type: <kbd>Ctrl+C</kbd>, or close the command prompt window.</p>


<h3 id="sub-commands">Sub-commands</h3>

<p>Serve also includes a number of useful sub-commands:</p>
<%= render "/documentation/sub-commands" %>


<h3 id="example-projects">Example projects</h3>

<p>Reading source code is a great way to improve your coding prowess. You may
  want to study one or more of the following projects to get a better
  idea of how to use Serve effectively.</p>

<dl>
  <dt><strong><a href="https://github.com/jlong/serve/tree/master/website">Serve Website Source</a></strong></dt>
  <dd>Check out the code that is being used for the Serve website. It&#8217;s a
    good example of using Serve to build a static site. We use
    the Serve <a href="/documentation/export">export</a> command to generate
    the site, and a handy
    <a href="https://github.com/jlong/serve/blob/master/tasks/website.rake">rsync rake
    task</a> to deploy.</dd>
  
  <dt><strong><a href="https://github.com/radiant/radiant-prototype">Radiant CMS Prototype</a></strong></dt>
  <dd>The Radiant CMS prototype project is a superb example of using Serve to
    prototype a Rails application. It&#8217;s a fully functional, clickable
    prototype without the backend. HTML prototypes are a great way to work out
    design issues before spending a lot of time on the programming.</dd>
  
  <dt><strong><a href="https://github.com/adamstac/serve-bootstrap">Adam Stacoviak&#8217;s Serve Bootstrap</a></strong></dt>
  <dd><a href="http://thechangelog.com/">The Changelog&#8217;s</a>
    very own <a href="http://adamstacoviak.com/">Adam Stacoviak</a> has put together a Serve bootstrap project
    with some of his favorite defaults. It comes packed with Haml, Sass, Compass,
    his own <a href="https://github.com/adamstac/grid-coordinates">Grid Coordinates</a> CSS grid framework, jQuery and Modernizer. It also comes
    ready to deploy on Heroku.</dd>
</dl>


<h3 id="documentation">Documentation</h3>

<%= render "/documentation/tree" %>